﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace BasicData.API.Write
{
    public class Errorfeils : IExceptionFilter
    {
        private readonly ILogger<Errorfeils> logger;

        public Errorfeils(ILogger<Errorfeils> logger)
        {
            this.logger = logger;
        }

        public void OnException(ExceptionContext context)
        {
            logger.LogError("[全局异常处理]" + context.Exception.Message);
        }
    }
}
